package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HomeImageMapper;
import com.ruoyi.system.domain.HomeImage;
import com.ruoyi.system.service.IHomeImageService;

/**
 * 轮播图Service业务层处理
 * 
 * @author admin
 * @date 2025-01-02
 */
@Service
public class HomeImageServiceImpl implements IHomeImageService 
{
    @Autowired
    private HomeImageMapper homeImageMapper;

    /**
     * 查询轮播图
     * 
     * @param id 轮播图主键
     * @return 轮播图
     */
    @Override
    public HomeImage selectHomeImageById(Long id)
    {
        return homeImageMapper.selectHomeImageById(id);
    }

    /**
     * 查询轮播图列表
     * 
     * @param homeImage 轮播图
     * @return 轮播图
     */
    @Override
    public List<HomeImage> selectHomeImageList(HomeImage homeImage)
    {
        return homeImageMapper.selectHomeImageList(homeImage);
    }

    /**
     * 新增轮播图
     * 
     * @param homeImage 轮播图
     * @return 结果
     */
    @Override
    public int insertHomeImage(HomeImage homeImage)
    {
        return homeImageMapper.insertHomeImage(homeImage);
    }

    /**
     * 修改轮播图
     * 
     * @param homeImage 轮播图
     * @return 结果
     */
    @Override
    public int updateHomeImage(HomeImage homeImage)
    {
        return homeImageMapper.updateHomeImage(homeImage);
    }

    /**
     * 批量删除轮播图
     * 
     * @param ids 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteHomeImageByIds(Long[] ids)
    {
        return homeImageMapper.deleteHomeImageByIds(ids);
    }

    /**
     * 删除轮播图信息
     * 
     * @param id 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteHomeImageById(Long id)
    {
        return homeImageMapper.deleteHomeImageById(id);
    }
}
